/**
 * Created by Administrator on 2016/5/13.
 */
$(document).ready(function(){

    $('body').on("click",'.heart',function(){
        var A=$(this).attr("id");
        var B=A.split("like");
        var messageID=B[1];
        $(this).css("background-position","")
        var D=$(this).attr("rel");

        if(D === 'like') {
            $(this).addClass("heartAnimation").attr("rel","unlike");
        }
        else{
            $(this).removeClass("heartAnimation").attr("rel","like");
            $(this).css("background-position","left");
        }
    });

});